1. Field of the Invention
The present invention relates to image processing apparatuses, image processing methods, and programs. More particularly, the present invention relates to an image processing apparatus, an image processing method, and a program, which are capable of correcting blur in an image while an area of a bright region in the image is maintained.
2. Description of the Related Art
In general, in a case where an image of a subject is captured using a camera, when the subject moves with respect to the camera or the camera is moved with respect to the subject, an image including motion blur may be captured. Accordingly, the image including motion blur is supplied from the camera to a display unit to be displayed.
To address this problem, a known image processing apparatus performs image processing on a blurred image supplied from a camera so as to suppress motion blur of the image. In such an image processing apparatus, a relative amount of motion between the camera and the subject is calculated in accordance with motion blur of an image. The amount of motion is used to estimate the motion blur at a time of imaging, and image processing is performed to suppress motion blur of an image to be displayed.
In an image including motion blur, for example, pixel values at edge portions of the image gradually change. The image processing apparatus is used to correct the pixel values at the edge portions, which gradually change, so that the pixel values at the edge portions markedly change.
In general, a display unit, such as a CRT (Cathode Ray Tube), of a television set for displaying an image has a characteristic (a gamma characteristic) in which brightness of a screen is not linearly proportional to a level of the image but is changed on an exponentially proportional basis. For example, a camera used in a television station performs gamma processing on an image obtained as a result of imaging so that a gamma characteristic of a display unit is corrected, and an image which is subjected to the gamma processing is output. For example, according to ITU-R BT601, ITU-R BT709, or sRGB (standard RGB), a gamma value used in gamma processing is set so as no substantially satisfy γ=1/2.2, provided that the CRT is a standard display apparatus.
However, there arises a problem in that when the image processing apparatus performs image processing to suppress motion blur on an image which was subjected to gamma processing in a camera, edge portions of the image are displaced.
Referring to FIGS. 1A and 1B and 2A to 2D, an image obtained after an image is subjected to gamma processing in a camera and then the image is subjected to image processing for suppressing motion blur will be described.
FIG. 1A is a block diagram illustrating a system including a camera 11, an image processing apparatus 12, and a display unit 13.
The camera 11 includes an imaging unit 14 and a gamma processing unit 15.
The imaging unit 14 captures an image of a subject, not shown, and supplies an obtained image T1 to the gamma processing unit 15.
The gamma processing unit 15 performs gamma processing on the image T1 supplied from the imaging unit 14, and supplies an image T2 obtained as a result of the gamma processing to the image processing apparatus 12. That is, the gamma processing unit 15 corrects pixel values of the image T1 supplied from the imaging unit 14 in accordance with a gamma curve shown in FIG. 1B, and supplies the image T2 including the corrected pixel values to the image processing apparatus 12.
The image processing apparatus 12 performs image processing for suppressing motion blur on the image T2 supplied from the gamma processing unit 15 of the camera 11. Furthermore, the image processing apparatus 12 supplies an image T3 obtained as a result of the image processing to the display unit 13.
The display unit 13 displays the image T3 which was subjected to the image processing performed using the image processing apparatus 12.
FIGS. 2A and 2B are graphs used for explaining an image T0 and the image T1, respectively, which are captured using the imaging unit 14. FIG. 2C is a graph used for explaining the image T2 subjected to gamma processing using the gamma processing unit 15. FIG. 2D is a graph used for explaining the image T3 subjected to image processing using the image processing apparatus 12.
In each of the graphs of FIGS. 2A to 2D, an axis of abscissa represents a position (a pixel position) in a first direction of the corresponding one of the images, and an axis of ordinate represents a pixel value (a luminance level) of the corresponding one of the images.
For example, when the camera 11 captures a scene including a white subject on a black background, an image obtained as a result of the capturing includes a black portion having a pixel value of 0 (substantially 0) corresponding to the black background, an edge portion having a pixel value varying from 0 to 100, and a white portion having a pixel value of 100 (substantially 100) corresponding to the white subject. FIGS. 2A to 2D illustrate portions around edge portions of the image obtained by capturing the scene including the white subject on the black background.
FIG. 2A is used to illustrate the image T0 captured using the imaging unit 14 when the subject and the camera 11 stay still.
The image T0 includes a black portion having a pixel value of 0 on the left side relative to a position A, an edge portion having a pixel value represented by a line steeply changing from 0 to 100 at the position A, and a white portion having a pixel value of 100 on the right side relative to the position A. Accordingly, when the subject and the camera 11 stay still, the image T0 including the edge portion having the pixel value represented by a steeply changing line (in a vertical direction with respect to the black portion and the white portion) is captured, that is, the image T0 without motion blur is captured.
FIG. 2B is used to illustrate the image T1 captured using the imaging unit 14 when the subject and the camera 11 are moved relative to each other.
The image T1 includes a black portion having a pixel value of 0 on the left side relative to a position B, an edge portion having a pixel value represented by a line gradually changing from 0 to 100 from the position B to a position A, and a white portion having a pixel value of 100 on the right side relative to the position A. A position C is a center position of the edge portion of the image T1.
As can be seen from the figure, when the subject and the camera 11 are moved relative to each other, the image T1 including the edge portion having the pixel value represented by a gradually changing line is captured, that is, the image T1 including motion blur is captured.
FIG. 2C is used to illustrate the image T2 obtained by performing gamma processing on the image T1 including motion blur using the gamma processing unit 15.
The image T2 includes a black portion having a pixel value of 0 on the left side relative to the position B, an edge portion subjected to gamma processing, located between the position B to the position A, and a white portion having a pixel value of 100 on the right side relative to the position A. That is, the image T2 has pixel values obtained by correcting the pixel value of the image T1 including motion blur in accordance with the gamma curve shown in FIG. 1. In the image T2, the curve representing the pixel value of the edge portion changes so as to markedly rise in the vicinity of the position B. As described above, the image T1 including motion blur is subjected to the gamma processing using the gamma processing unit 15, whereby the image T2 including the edge portion having the curve representing the pixel value which changes so as to markedly rise in the vicinity of the position B is obtained.
FIG. 2D is used to illustrate the image T3 which is obtained by performing image processing on the image T2, which was subjected to the gamma processing, using the image processing apparatus 12.
The image T3 includes a black portion having a pixel value of 0 on the left side relative to the position B, an edge portion for which a line representing a pixel value more steeply changes than that representing the pixel value of the edge portion of the image T1 and which is located between the position B and a position D which is located on the left side relative to the position A, and a white portion having a pixel value of 100 on the right side relative to the position D. Note that a position C′ is a center position of the edge portion of the image T3.
As described above, the image T2 which was subjected to the gamma processing is further subjected to image processing using the image processing apparatus 12, whereby the image T3 having the edge portion for which the curve representing the pixel value more steeply changes than that representing the pixel value of the edge portion of the image T1 is obtained, that is, the image T3 in which motion blur included therein is suppressed when compared with the motion blur included in the image T1.
However, in the image T3, the position C′ which is a center position of the edge portion of the image T3 is displaced to the left from the position C which is a center position of the edge portion of the image T1 captured using the imaging unit 14. Specifically, the center position of the edge portion of the image T3, which was subjected to the image processing using the image processing apparatus 12, is displaced with respect to the center of the edge portion of the image T2, which was subjected to the gamma processing.
When the edge portion is displaced as described above, the white portion becomes wider, and accordingly, a bright region of the captured subject becomes wider, resulting in deterioration of a displayed image.
To address this disadvantage, Japanese Unexamined Patent Application Publication No. 2005-286411, for example, discloses an image processing apparatus which processes a luminance signal and a color signal of an image so that contours in the image are emphasized, and which selects one of an image in which a luminance signal thereof was processed and an image in which a color signal thereof was processed in accordance with the relationship in hue between the subject and the background.